/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui2android7cui.util;

import java.util.List;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;

import vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui2android7cui.*;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see vn.edu.hcmus.fit.se.mdd.mbuid.adaptedaui2android7cui.Adaptedaui2android7cuiPackage
 * @generated
 */
public class Adaptedaui2android7cuiSwitch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static Adaptedaui2android7cuiPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Adaptedaui2android7cuiSwitch() {
		if (modelPackage == null) {
			modelPackage = Adaptedaui2android7cuiPackage.eINSTANCE;
		}
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	public T doSwitch(EObject theEObject) {
		return doSwitch(theEObject.eClass(), theEObject);
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	protected T doSwitch(EClass theEClass, EObject theEObject) {
		if (theEClass.eContainer() == modelPackage) {
			return doSwitch(theEClass.getClassifierID(), theEObject);
		}
		else {
			List<EClass> eSuperTypes = theEClass.getESuperTypes();
			return
				eSuperTypes.isEmpty() ?
					defaultCase(theEObject) :
					doSwitch(eSuperTypes.get(0), theEObject);
		}
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case Adaptedaui2android7cuiPackage.PRESENTATION: {
				Presentation presentation = (Presentation)theEObject;
				T result = casePresentation(presentation);
				if (result == null) result = caseUserInterface(presentation);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.USER_INTERFACE: {
				UserInterface userInterface = (UserInterface)theEObject;
				T result = caseUserInterface(userInterface);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.ACTION: {
				Action action = (Action)theEObject;
				T result = caseAction(action);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.PRESENTATION_UNIT: {
				PresentationUnit presentationUnit = (PresentationUnit)theEObject;
				T result = casePresentationUnit(presentationUnit);
				if (result == null) result = casePresentation(presentationUnit);
				if (result == null) result = caseUserInterface(presentationUnit);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.UI_COMPONENT: {
				UIComponent uiComponent = (UIComponent)theEObject;
				T result = caseUIComponent(uiComponent);
				if (result == null) result = caseUserInterface(uiComponent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.UI_COMPONENT_RELATIONSHIP: {
				UIComponentRelationship uiComponentRelationship = (UIComponentRelationship)theEObject;
				T result = caseUIComponentRelationship(uiComponentRelationship);
				if (result == null) result = caseRelationship(uiComponentRelationship);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.RELATIONSHIP: {
				Relationship relationship = (Relationship)theEObject;
				T result = caseRelationship(relationship);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.UI_ELEMENT: {
				UIElement uiElement = (UIElement)theEObject;
				T result = caseUIElement(uiElement);
				if (result == null) result = caseUIComponent(uiElement);
				if (result == null) result = caseUserInterface(uiElement);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.ABSTRACT_UI_COMPONENT: {
				AbstractUIComponent abstractUIComponent = (AbstractUIComponent)theEObject;
				T result = caseAbstractUIComponent(abstractUIComponent);
				if (result == null) result = caseUIComponent(abstractUIComponent);
				if (result == null) result = caseUserInterface(abstractUIComponent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.INPUT_FIELD: {
				InputField inputField = (InputField)theEObject;
				T result = caseInputField(inputField);
				if (result == null) result = caseUIElement(inputField);
				if (result == null) result = caseUIComponent(inputField);
				if (result == null) result = caseUserInterface(inputField);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.OUTPUT_FIELD: {
				OutputField outputField = (OutputField)theEObject;
				T result = caseOutputField(outputField);
				if (result == null) result = caseUIElement(outputField);
				if (result == null) result = caseUIComponent(outputField);
				if (result == null) result = caseUserInterface(outputField);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.SELECTOR: {
				Selector selector = (Selector)theEObject;
				T result = caseSelector(selector);
				if (result == null) result = caseUIElement(selector);
				if (result == null) result = caseUIComponent(selector);
				if (result == null) result = caseUserInterface(selector);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.COMMAND: {
				Command command = (Command)theEObject;
				T result = caseCommand(command);
				if (result == null) result = caseUIElement(command);
				if (result == null) result = caseUIComponent(command);
				if (result == null) result = caseUserInterface(command);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.MULTIPLE_CHOICE: {
				MultipleChoice multipleChoice = (MultipleChoice)theEObject;
				T result = caseMultipleChoice(multipleChoice);
				if (result == null) result = caseSelector(multipleChoice);
				if (result == null) result = caseUIElement(multipleChoice);
				if (result == null) result = caseUIComponent(multipleChoice);
				if (result == null) result = caseUserInterface(multipleChoice);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.SINGLE_CHOICE: {
				SingleChoice singleChoice = (SingleChoice)theEObject;
				T result = caseSingleChoice(singleChoice);
				if (result == null) result = caseSelector(singleChoice);
				if (result == null) result = caseUIElement(singleChoice);
				if (result == null) result = caseUIComponent(singleChoice);
				if (result == null) result = caseUserInterface(singleChoice);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.NAVIGATOR: {
				Navigator navigator = (Navigator)theEObject;
				T result = caseNavigator(navigator);
				if (result == null) result = caseCommand(navigator);
				if (result == null) result = caseUIElement(navigator);
				if (result == null) result = caseUIComponent(navigator);
				if (result == null) result = caseUserInterface(navigator);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.ACTIVATOR: {
				Activator activator = (Activator)theEObject;
				T result = caseActivator(activator);
				if (result == null) result = caseCommand(activator);
				if (result == null) result = caseUIElement(activator);
				if (result == null) result = caseUIComponent(activator);
				if (result == null) result = caseUserInterface(activator);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.PRESENTATION_SYSTEM: {
				PresentationSystem presentationSystem = (PresentationSystem)theEObject;
				T result = casePresentationSystem(presentationSystem);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.UI_CONTAINER_RELATIONSHIP: {
				UIContainerRelationship uiContainerRelationship = (UIContainerRelationship)theEObject;
				T result = caseUIContainerRelationship(uiContainerRelationship);
				if (result == null) result = caseUIComponentRelationship(uiContainerRelationship);
				if (result == null) result = caseRelationship(uiContainerRelationship);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case Adaptedaui2android7cuiPackage.UI_TEMPORAL_RELATIONSHIP: {
				UITemporalRelationship uiTemporalRelationship = (UITemporalRelationship)theEObject;
				T result = caseUITemporalRelationship(uiTemporalRelationship);
				if (result == null) result = caseUIComponentRelationship(uiTemporalRelationship);
				if (result == null) result = caseRelationship(uiTemporalRelationship);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Presentation</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Presentation</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePresentation(Presentation object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>User Interface</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>User Interface</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUserInterface(UserInterface object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Action</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Action</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAction(Action object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Presentation Unit</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Presentation Unit</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePresentationUnit(PresentationUnit object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>UI Component</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>UI Component</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUIComponent(UIComponent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>UI Component Relationship</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>UI Component Relationship</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUIComponentRelationship(UIComponentRelationship object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Relationship</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Relationship</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseRelationship(Relationship object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>UI Element</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>UI Element</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUIElement(UIElement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Abstract UI Component</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Abstract UI Component</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseAbstractUIComponent(AbstractUIComponent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Input Field</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Input Field</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseInputField(InputField object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Output Field</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Output Field</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseOutputField(OutputField object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Selector</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Selector</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseSelector(Selector object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Command</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Command</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseCommand(Command object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Multiple Choice</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Multiple Choice</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseMultipleChoice(MultipleChoice object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Single Choice</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Single Choice</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseSingleChoice(SingleChoice object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Navigator</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Navigator</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseNavigator(Navigator object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Activator</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Activator</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseActivator(Activator object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Presentation System</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Presentation System</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casePresentationSystem(PresentationSystem object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>UI Container Relationship</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>UI Container Relationship</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUIContainerRelationship(UIContainerRelationship object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>UI Temporal Relationship</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>UI Temporal Relationship</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseUITemporalRelationship(UITemporalRelationship object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	public T defaultCase(EObject object) {
		return null;
	}

} //Adaptedaui2android7cuiSwitch
